package com.chuck.basic.core.utils;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

public final class DefValueHelper {
    private DefValueHelper(){

    }
    public static String getOrDef(String val,String def){
        return StringUtils.isBlank(val) ? def : val;
    }
    public static <T extends Serializable> T getOrDef(T val, T def) {
        return val == null ? def : val;
    }

}
